'use strict';

mui.init();
mui.plusReady(function () {
	console.log(1)
	console.log(mui('#register')[0])
	mui('#register')[0].addEventListener('tap', function () {
		alert('我被点击了')
		mui.ajax({
			/*mui.ajax({
				url: url2, //注册 接口请求
				type: 'post',
				data: {
					'username': usernameValue,
					'password': passwordValue
				},
				headers: {
					"X-LC-Id": "Us4gQNj1kdx1Cv3oi06hLnGu-gzGzoHsz",
					"X-LC-Key": "27exTSjI41ozaFxmL3XDIkNn"
				},
				success: function (response) {
					mui.toast('登录成功!');
					localStorage.setItem('sessionToken', response.sessionToken);
					localStorage.setItem('username', response.username);
					setTimeout(function () {
						mui.openWindow('../main/main.html', 'main');				
					}, 2000);
				},
				error: function (error) {
					mui.toast('账号或者密码错误!')
				}
			})*/
		})
	})
	mui('.back')[0].addEventListener('tap', function () {
		mui.back();
	})
})
